------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/bschaf03/Dropbox/Local and National Ideology Survey/Analysis/Replication Fil
> es/lucid_replication1.log
  log type:  text
 opened on:  20 Jun 2024, 22:28:28

. 
. * Import data
. 
. import delimited "lucid_data.csv", varnames(1) clear bindquote(strict)
(encoding automatically selected: ISO-8859-1)
(148 vars, 1,209 obs)

. 
. * Create race where ME is merged with other
. gen race4=1 if ethnicity==1 & hispanic==1
(395 missing values generated)

. replace race4=2 if ethnicity==2
(144 real changes made)

. replace race4=3 if hispanic>1
(177 real changes made)

. replace race4=4 if race4==.
(92 real changes made)

. 
. label define race 1 "White" 2 "Black" 3 "Hispanic" 4 "Other"

. label values race4 race

. 
. * Recode age
. recode age 18/29=1 30/39=2 40/49=3 50/59=4 60/69=5 70/100=6, gen(agecat)
(1207 differences between age and agecat)

. label define agecat 1 "18-29" 2 "30-39" 3 "40-49" 4 "50-59" 5 "60-69" 6 "70+"

. label values agecat agecat

. 
. * Label gender
. label define gender 1 "Male" 2 "Female"

. label values gender gender

. 
. * Recode education
. recode education 9=. 
(0 changes made to education)

. recode education 2/3=2 4=3 5=4 6=5 7/8=6 -3105=., gen(educ)
(815 differences between education and educ)

. label define educ 1 "No HS" 2 "HS Degree" 3 "Some college" 4 "2 year degree" 5 "4 year degree"
>  6 "Post grad"

. label values educ educ

. 
. * Party ID
. gen pid7=1 if political_party==1
(872 missing values generated)

. replace pid7=2 if political_party==2
(115 real changes made)

. replace pid7=3 if political_party==3 | political_party==6
(116 real changes made)

. replace pid7=4 if political_party==4
(165 real changes made)

. replace pid7=5 if political_party==5 | political_party==8
(121 real changes made)

. replace pid7=6 if political_party==9
(70 real changes made)

. replace pid7=7 if political_party==10
(173 real changes made)

. replace pid7=8 if political_party==7
(110 real changes made)

. 
. 
. * Filter out bad respondents using attention check item and dropping speeders
. drop if attncheck_1!=5
(204 observations deleted)

. drop if durationinseconds<240
(96 observations deleted)

. 
. * Recode to missing respodents who say they don't have a busiess district
. recode increased_parking 6=3
(63 changes made to increased_parking)

. 
. * Analysis of correlations
. 
. local varlist  affordable_housing rent_controls pre_education public_transit samesex_benefits 
> landuse_limits aesthetic_impact business_taxbreaks_1 business_taxbreaks_2 business_taxbreaks_3
>  increased_parking require_recycling increase_localpolice employee_pension internet_access nim
> by cut_socialservices deficit_taxes affirmative_action environ_policy gun_control immigration 
> abortion healthcare cut_domestic_spend cut_raise_taxes tariffs_china marijuana military enviro
> n_drill voterid

. 
. local nvars : word count `varlist' 

. 
. local N = `nvars' * (`nvars' - 1) / 2 

. 
. if `N' > _N set obs `N' 

. 
. gen x = "" 
(909 missing values generated)

. gen y = "" 
(909 missing values generated)

. gen r = . 
(909 missing values generated)

. local k = 1 

. tokenize "`varlist'" 

. 
. forval i = 1/`nvars' { 
  2.     local J = `i' + 1 
  3.     forval j = `J'/`nvars' { 
  4.         quietly {
  5.             corr ``i'' ``j'' 
  6.             replace x = "``i''" in `k' 
  7.             replace y = "``j''" in `k' 
  8.             replace r = r(rho) in `k' 
  9.         }
 10.         local ++k 
 11.     }
 12. }

. 
. gen xtype="local" if x=="affordable_housing" | x=="rent_controls" | x=="pre_education" | x=="p
> ublic_transit" | x=="samesex_benefits" | x=="landuse_limits" | x=="aesthetic_impact" | x=="bus
> iness_taxbreaks_1" | x=="business_taxbreaks_2" | x=="business_taxbreaks_3" | x=="increased_par
> king" | x=="require_recycling" | x=="increase_localpolice" | x=="employee_pension" | x=="inter
> net_access" | x=="nimby" | x=="cut_socialservices" | x=="deficit_taxes" 
(522 missing values generated)

. 
. replace xtype="national" if xtype=="" & x!=""
variable xtype was str5 now str8
(78 real changes made)

. 
. gen ytype="local" if y=="affordable_housing" | y=="rent_controls" | y=="pre_education" | y=="p
> ublic_transit" | y=="samesex_benefits" | y=="landuse_limits" | y=="aesthetic_impact" | y=="bus
> iness_taxbreaks_1" | y=="business_taxbreaks_2" | y=="business_taxbreaks_3" | y=="increased_par
> king" | y=="require_recycling" | y=="increase_localpolice" | y=="employee_pension" | y=="inter
> net_access" | y=="nimby" | y=="cut_socialservices" | y=="deficit_taxes" 
(756 missing values generated)

. 
. replace ytype="national" if ytype=="" & y!=""
variable ytype was str5 now str8
(312 real changes made)

. 
. gen typematch="local-local" if xtype=="local" & ytype=="local"
(756 missing values generated)

. replace typematch="national-national" if xtype=="national" & ytype=="national"
variable typematch was str11 now str17
(78 real changes made)

. replace typematch="local-national" if xtype=="local" & ytype=="national"
(234 real changes made)

. replace typematch="local-national" if xtype=="national" & ytype=="local"
(0 real changes made)

. 
. encode typematch, gen(typematch2)

. 
. * Figure 1: Graph of distributions of r (not in PAP)
. 
. twoway histogram r, by(typematch2, row(1) note(" ")) percent bin(30) aspect(1) xtitle("Correla
> tion coefficient") 

. graph export figure1.png, replace
file /Users/bschaf03/Dropbox/Local and National Ideology Survey/Analysis/Replication
    Files/figure1.png saved as PNG format

. 
. * Heatmap of correlations (not in PAP) 
.         * Need to install heatplot, palettes, and colrspace packages using ssc install
. 
. corr affordable_housing rent_controls pre_education public_transit samesex_benefits landuse_li
> mits aesthetic_impact business_taxbreaks_1 business_taxbreaks_2 business_taxbreaks_3 increased
> _parking require_recycling increase_localpolice employee_pension internet_access nimby cut_soc
> ialservices deficit_taxes affirmative_action environ_policy gun_control immigration abortion h
> ealthcare cut_domestic_spend cut_raise_taxes tariffs_china marijuana military environ_drill vo
> terid
(obs=901)

             | afford~g rent_c~s pre_ed~n public~t samese~s landus~s aesthe~t busine~1 busine~2
-------------+---------------------------------------------------------------------------------
affordable~g |   1.0000
rent_contr~s |   0.3639   1.0000
pre_educat~n |   0.5229   0.3110   1.0000
public_tra~t |   0.5105   0.3710   0.4825   1.0000
samesex_be~s |   0.3956   0.3079   0.3876   0.2932   1.0000
landuse_li~s |   0.2365   0.2272   0.2551   0.2651   0.1862   1.0000
aesthetic_~t |   0.1975   0.2399   0.2356   0.2505   0.1853   0.3133   1.0000
business_t~1 |   0.2500   0.1217   0.2348   0.2543   0.1437   0.2093   0.2046   1.0000
business_t~2 |   0.1796   0.0667   0.1508   0.1909   0.1212   0.1758   0.1627   0.6938   1.0000
business_t~3 |   0.1891   0.0335   0.0960   0.1014   0.0853   0.1226   0.1323   0.5374   0.7105
increased_~g |   0.2797   0.2342   0.2627   0.2715   0.2200   0.1613   0.2084   0.2755   0.2422
require_re~g |   0.3323   0.2984   0.3931   0.3428   0.3426   0.2893   0.2686   0.2015   0.1433
increase_l~e |  -0.0312   0.0141   0.0225   0.1480  -0.0144   0.2041   0.2141   0.2174   0.2310
employee_p~n |   0.0878   0.0284   0.0940  -0.0156   0.1290   0.1781   0.1879   0.1597   0.1801
internet_a~s |   0.4362   0.3271   0.4536   0.3817   0.3991   0.2144   0.2228   0.2379   0.2066
       nimby |   0.4135   0.2004   0.3422   0.2549   0.2563   0.1857   0.2121   0.2972   0.2692
cut_social~s |   0.0793  -0.0099   0.0452  -0.0496   0.0720   0.2101   0.0983   0.2196   0.2455
deficit_ta~s |   0.3099   0.1775   0.2704   0.0974   0.2832   0.2855   0.2698   0.2650   0.2323
affirmativ~n |   0.4613   0.3134   0.3949   0.3000   0.4039   0.2076   0.2351   0.2357   0.1715
environ_po~y |   0.4288   0.3576   0.4226   0.3684   0.4099   0.3239   0.2727   0.1640   0.0702
 gun_control |   0.3099   0.2883   0.2946   0.3141   0.2977   0.2146   0.2995   0.0917   0.0430
 immigration |  -0.2112  -0.1399  -0.1559  -0.0884  -0.2369   0.0834   0.1116   0.1656   0.2313
    abortion |  -0.0544  -0.0369   0.0014  -0.0021  -0.0699   0.1410   0.1164   0.1692   0.1919
  healthcare |   0.4986   0.3688   0.4875   0.3646   0.4435   0.1714   0.1594   0.1450   0.0613
cut_domest~d |  -0.0148  -0.0523   0.0152  -0.1651   0.0542   0.1816   0.0379   0.1917   0.2140
cut_raise_~s |   0.2919   0.2139   0.2868   0.1371   0.2876   0.2176   0.1820   0.1809   0.1489
tariffs_ch~a |   0.0073   0.0303   0.0007   0.0440   0.0588   0.1164   0.1528   0.1536   0.1584
   marijuana |   0.2992   0.2111   0.2243   0.2105   0.3423   0.0705   0.0511   0.0691   0.0715
    military |  -0.0142   0.0202   0.0117   0.0447  -0.0495   0.1011   0.1662   0.2016   0.2079
environ_dr~l |   0.2371   0.2516   0.2498   0.1184   0.2259   0.1824   0.1568   0.1089   0.0684
     voterid |  -0.0742   0.0060  -0.0046   0.0947  -0.1118   0.1049   0.1293   0.1396   0.1335

             | busine~3 increa~g requir~g increa~e employ~n intern~s    nimby cut_so~s defici~s
-------------+---------------------------------------------------------------------------------
business_t~3 |   1.0000
increased_~g |   0.2244   1.0000
require_re~g |   0.1151   0.2555   1.0000
increase_l~e |   0.2245   0.1897   0.0547   1.0000
employee_p~n |   0.2556   0.2082   0.1352   0.0987   1.0000
internet_a~s |   0.1624   0.2541   0.3333   0.0364   0.0971   1.0000
       nimby |   0.3191   0.3199   0.2463   0.0498   0.2100   0.3438   1.0000
cut_social~s |   0.3095   0.1209   0.0989   0.0776   0.3577   0.0987   0.3393   1.0000
deficit_ta~s |   0.2500   0.2620   0.2507   0.0418   0.3083   0.3792   0.4508   0.4281   1.0000
affirmativ~n |   0.1524   0.2876   0.3348  -0.0900   0.1777   0.4164   0.3900   0.2641   0.4197
environ_po~y |   0.0218   0.2542   0.4459  -0.0537   0.1229   0.4068   0.2692   0.0836   0.3616
 gun_control |  -0.0077   0.2065   0.4096   0.1089   0.0212   0.2623   0.1265  -0.0859   0.0962
 immigration |   0.2956   0.0419  -0.1430   0.4592   0.1472  -0.1440  -0.0419   0.2118  -0.0538
    abortion |   0.2457   0.0730  -0.0061   0.2786   0.2196  -0.0426   0.0321   0.2605   0.0989
  healthcare |   0.0765   0.2458   0.3430  -0.1066   0.1301   0.4182   0.3384   0.1416   0.3208
cut_domest~d |   0.3416   0.1528   0.0246   0.1334   0.3784   0.0614   0.2945   0.5703   0.3959
cut_raise_~s |   0.1860   0.2745   0.2508   0.0204   0.2593   0.3784   0.3746   0.3062   0.5652
tariffs_ch~a |   0.1602   0.1415   0.0506   0.1970   0.1937   0.0562   0.0875   0.1628   0.0981
   marijuana |   0.0765   0.1554   0.1488  -0.1490   0.1133   0.2377   0.2056   0.0708   0.1510
    military |   0.1843   0.1046  -0.0091   0.3275   0.1136  -0.0123   0.0467   0.0840  -0.0358
environ_dr~l |   0.0457   0.1747   0.2209  -0.0503   0.1216   0.2288   0.2338   0.1633   0.2989
     voterid |   0.1858   0.1326   0.0421   0.3531   0.0637  -0.0887   0.0039   0.0722  -0.0779

             | affirm~n enviro~y gun_co~l immigr~n abortion health~e cut_do~d cut_ra~s tariff~a
-------------+---------------------------------------------------------------------------------
affirmativ~n |   1.0000
environ_po~y |   0.5042   1.0000
 gun_control |   0.2624   0.4945   1.0000
 immigration |  -0.2288  -0.3122  -0.1006   1.0000
    abortion |  -0.0010  -0.0853  -0.0093   0.3622   1.0000
  healthcare |   0.5474   0.5379   0.3610  -0.3102  -0.0514   1.0000
cut_domest~d |   0.2337   0.0624  -0.1216   0.3123   0.2985   0.0640   1.0000
cut_raise_~s |   0.4155   0.3858   0.1529  -0.0677   0.0861   0.3850   0.3388   1.0000
tariffs_ch~a |   0.0135  -0.0228   0.0489   0.2942   0.2393  -0.0685   0.1934   0.1264   1.0000
   marijuana |   0.3278   0.2817   0.1425  -0.1621  -0.1378   0.3815   0.0546   0.2314  -0.0080
    military |  -0.0578  -0.0537   0.0935   0.4443   0.2531  -0.1100   0.1441  -0.0124   0.2793
environ_dr~l |   0.3396   0.3471   0.2094  -0.0813   0.0156   0.3203   0.1419   0.2883   0.0889
     voterid |  -0.1631  -0.1278   0.0636   0.4694   0.2883  -0.1297   0.1119  -0.1272   0.2285

             | mariju~a military enviro~l  voterid
-------------+------------------------------------
   marijuana |   1.0000
    military |  -0.0158   1.0000
environ_dr~l |   0.2155   0.0120   1.0000
     voterid |  -0.0712   0.3223  -0.0508   1.0000


. 
. return list

scalars:
                  r(N) =  901
                r(rho) =  .3639259463455491

matrices:
                  r(C) :  31 x 31

. matrix corrmatrix = r(C)

. 
. heatplot corrmatrix, values(format(%4.2f) size(2-pt)) legend(off) color(hcl diverging, intensi
> ty(.7)) cuts(-1(.2)1)  xlabel(,angle(90) labs(vsmall)) aspect(1) ylabel(,labs(vsmall)) ysize(4
> .5) xsize(4.5)

. graph export FigureA2.pdf, replace
file /Users/bschaf03/Dropbox/Local and National Ideology Survey/Analysis/Replication
    Files/FigureA2.pdf saved as PDF format

. 
. * This is a new line of code but it creates the absolute value of correlation to account for i
> tems that may be in reverse direction
. replace r = abs(r)
(66 real changes made)

. 
. mean r, over(typematch2)

Mean estimation                                  Number of obs = 465

--------------------------------------------------------------------
                   |       Mean   Std. err.     [95% conf. interval]
-------------------+------------------------------------------------
    c.r@typematch2 |
      local-local  |   .2302276   .0101581       .210266    .2501891
   local-national  |   .1831969    .008288      .1669102    .1994837
national-national  |    .198814   .0165651      .1662622    .2313658
--------------------------------------------------------------------

. 
. * Factor analysis
. quietly: factor affordable_housing-voterid, fac(6) ml

. 
end of do-file

. do "/var/folders/pq/zx03q0l563v0l1rmwch2w1y4tzzm0f/T//SD39928.000000"

. fapara, seed(111) reps(10) 

PA -- Parallel Analysis for Factor Analysis -- N = 901
PA Eigenvalues Averaged Over 10 Replications
         FA         PA          Dif
  1.   4.168414    .3988789   3.769535  
  2.   4.946847    .3558456   4.591001  
  3.   2.066138    .3166187    1.74952  
  4.   1.738625    .2844987   1.454126  
  5.   .5572888    .2560804   .3012084  
  6.   .4209496    .2294782   .1914714  
  7.          .    .2071267          .  
  8.          .    .1813198          .  
  9.          .    .1581008          .  
 10.          .    .1381265          .  
 11.          .    .1169604          .  
 12.          .    .0946586          .  
 13.          .    .0794819          .  
 14.          .    .0609174          .  
 15.          .    .0353598          .  
 16.          .    .0216649          .  
 17.          .     .001875          .  
 18.          .   -.0169918          .  
 19.          .   -.0316493          .  
 20.          .     -.04924          .  
 21.          .   -.0692176          .  
 22.          .   -.0875186          .  
 23.          .   -.1057377          .  
 24.          .   -.1205555          .  
 25.          .    -.135695          .  
 26.          .   -.1569806          .  
 27.          .   -.1744589          .  
 28.          .   -.2022758          .  
 29.          .   -.2229037          .  
 30.          .   -.2473869          .  
 31.          .   -.2700896          .  

. 
. rotate, oblique p fac(4)

Factor analysis/correlation                      Number of obs    =        901
    Method: maximum likelihood                   Retained factors =          6
    Rotation: oblique promax (Kaiser off)        Number of params =        171
                                                 Schwarz's BIC    =    1683.34
    Log likelihood = -259.9726                   (Akaike's) AIC   =    861.945

    --------------------------------------------------------------------------
         Factor  |     Variance   Proportion    Rotated factors are correlated
    -------------+------------------------------------------------------------
        Factor1  |      6.13271       0.4413
        Factor2  |      3.72819       0.2682
        Factor3  |      3.26554       0.2350
        Factor4  |      2.82934       0.2036
        Factor5  |      0.55729       0.0401
        Factor6  |      0.42095       0.0303
    --------------------------------------------------------------------------
    LR test: independent vs. saturated: chi2(465) = 9972.76 Prob>chi2 = 0.0000
    LR test:   6 factors vs. saturated: chi2(294) =  511.19 Prob>chi2 = 0.0000

Rotated factor loadings (pattern matrix) and unique variances

    -----------------------------------------------------------------------------------------
        Variable |  Factor1   Factor2   Factor3   Factor4   Factor5   Factor6 |   Uniqueness 
    -------------+------------------------------------------------------------+--------------
    affordable~g |   0.6850   -0.0422    0.0799   -0.0967    0.2802   -0.0514 |      0.4266  
    rent_contr~s |   0.5699   -0.0924   -0.0497    0.0348    0.0164   -0.0002 |      0.7112  
    pre_educat~n |   0.6781   -0.0492    0.0125    0.0046    0.1827   -0.0496 |      0.5189  
    public_tra~t |   0.7081   -0.3390    0.0929    0.1422    0.2194   -0.0946 |      0.4407  
    samesex_be~s |   0.5459    0.0541    0.0221   -0.1365    0.0088    0.0758 |      0.6509  
    landuse_li~s |   0.3644    0.1380   -0.0364    0.2462   -0.1536   -0.0962 |      0.7317  
    aesthetic_~t |   0.4071    0.0316   -0.0420    0.3013   -0.1947   -0.1606 |      0.6872  
    business_t~1 |   0.1440   -0.0113    0.6687    0.0532    0.0215   -0.0446 |      0.4531  
    business_t~2 |  -0.0371   -0.0717    1.0227   -0.0436   -0.0280    0.0070 |      0.0524  
    business_t~3 |  -0.0707    0.1612    0.6750    0.0830    0.1161    0.0544 |      0.3973  
    increased_~g |   0.3661    0.0996    0.0838    0.1538    0.0475   -0.0276 |      0.7625  
    require_re~g |   0.5818   -0.0211   -0.0043    0.0569   -0.1574    0.0085 |      0.6429  
    increase_l~e |   0.0614   -0.0334    0.0309    0.6108   -0.0501   -0.1282 |      0.5942  
    employee_p~n |   0.0281    0.4540   -0.0119    0.1486   -0.0347    0.0728 |      0.7463  
    internet_a~s |   0.5643    0.0721    0.0861   -0.0818    0.0747   -0.1348 |      0.5863  
           nimby |   0.3329    0.3511    0.1116   -0.0355    0.2125   -0.0980 |      0.5772  
    cut_social~s |  -0.1034    0.6903    0.0302    0.0970    0.0582    0.0765 |      0.5074  
    deficit_ta~s |   0.2525    0.6468    0.0117   -0.1021   -0.1026   -0.3069 |      0.3061  
    affirmativ~n |   0.5367    0.2962    0.0252   -0.2025    0.0422    0.1421 |      0.4620  
    environ_po~y |   0.7265    0.0768   -0.0901   -0.1231   -0.2740    0.1144 |      0.3549  
     gun_control |   0.6589   -0.2258   -0.1099    0.1771   -0.3063    0.1437 |      0.4986  
     immigration |  -0.3034    0.1543    0.0192    0.7335    0.0681    0.0304 |      0.3339  
        abortion |  -0.1003    0.2417    0.0022    0.4325    0.0015    0.0500 |      0.7325  
      healthcare |   0.6737    0.1202   -0.0627   -0.2074    0.0972    0.2022 |      0.4076  
    cut_domest~d |  -0.2029    0.8002   -0.0416    0.1870    0.0374    0.1757 |      0.3456  
    cut_raise_~s |   0.3247    0.5198   -0.0595   -0.0810   -0.0555   -0.0964 |      0.5341  
    tariffs_ch~a |   0.0165    0.1558   -0.0171    0.3789   -0.0244    0.0032 |      0.8228  
       marijuana |   0.3521    0.0739    0.0269   -0.1783    0.1476    0.2323 |      0.7449  
        military |   0.0137   -0.0153    0.0330    0.5438   -0.0053    0.0877 |      0.6841  
    environ_dr~l |   0.3482    0.2269   -0.0761   -0.0382   -0.0968    0.0892 |      0.7799  
         voterid |   0.0022   -0.0673   -0.0512    0.6396    0.0653    0.0518 |      0.6081  
    -----------------------------------------------------------------------------------------

Factor rotation matrix

    --------------------------------------------------------------------
                 | Factor1  Factor2  Factor3  Factor4  Factor5  Factor6 
    -------------+------------------------------------------------------
         Factor1 |  0.4573   0.4908   0.9780   0.3662   0.0000   0.0000 
         Factor2 |  0.8515   0.2917  -0.1898  -0.3671   0.0000   0.0000 
         Factor3 |  0.2366  -0.3252  -0.0426   0.7636   0.0000   0.0000 
         Factor4 | -0.0991   0.7539  -0.0756   0.3849   0.0000   0.0000 
         Factor5 |  0.0000   0.0000   0.0000   0.0000   1.0000   0.0000 
         Factor6 |  0.0000   0.0000   0.0000   0.0000   0.0000   1.0000 
    --------------------------------------------------------------------

. 
. *** Factor analysis using polychoric correlations (robustness check for SI) ***
. 
. polychoric affordable_housing rent_controls pre_education public_transit samesex_benefits land
> use_limits aesthetic_impact business_taxbreaks_1 business_taxbreaks_2 business_taxbreaks_3 inc
> reased_parking require_recycling increase_localpolice employee_pension internet_access nimby c
> ut_socialservices deficit_taxes affirmative_action environ_policy gun_control immigration abor
> tion healthcare cut_domestic_spend cut_raise_taxes tariffs_china marijuana military environ_dr
> ill voterid

Polychoric correlation matrix

                        affordable_housing         rent_controls         pre_education
  affordable_housing                     1
       rent_controls             .45259314                     1
       pre_education             .60171084             .38278208                     1
      public_transit             .61337544             .47765054             .58514899
    samesex_benefits             .47802073             .38441345             .46737392
      landuse_limits             .29516087             .28791067             .30745424
    aesthetic_impact             .23596106             .28831564             .27742151
business_taxbreaks_1             .31698719             .17103073             .29570466
business_taxbreaks_2             .21991844             .09049455             .18952559
business_taxbreaks_3             .23005659             .03905064             .12335699
   increased_parking             .33781553             .28088699             .31186212
   require_recycling             .40664631             .36066989             .46438067
increase_localpolice             -.0146382             .03886376             .05868294
    employee_pension             .11390351              .0364805              .1235054
     internet_access             .51233586             .39367862              .5339247
               nimby             .48297406             .24773092             .40740866
  cut_socialservices             .08553097            -.03018865              .0364025
       deficit_taxes             .37130526             .21070794             .32418345
  affirmative_action             .54225083             .37937376             .45436401
      environ_policy             .50195296             .42425694             .48496083
         gun_control             .40076585             .39365823             .37760237
         immigration            -.24618427            -.16391256            -.18639966
            abortion            -.05244478            -.04121192             .01350772
          healthcare              .5768077             .45082482             .56475893
  cut_domestic_spend            -.02920321            -.08978438             .00250779
     cut_raise_taxes             .34336422             .25028428             .33559402
       tariffs_china             .01667964             .03426445             .01009329
           marijuana              .3779849             .27894209             .28348271
            military            -.00327864             .04057213             .03826718
       environ_drill             .29034036             .30754861             .29533168
             voterid            -.08765593             .01469118             .00732312

                            public_transit      samesex_benefits        landuse_limits
      public_transit                     1
    samesex_benefits             .38156662                     1
      landuse_limits             .34026093             .23129655                     1
    aesthetic_impact             .30859157             .22434257             .38123593
business_taxbreaks_1             .33364722             .18475401             .26138224
business_taxbreaks_2             .24786024             .14746731             .22074394
business_taxbreaks_3              .1318107              .1025159             .15936486
   increased_parking             .34580569             .26009737             .20682689
   require_recycling             .43172919             .42069891             .36052459
increase_localpolice             .20061584            -.00627981             .24933424
    employee_pension            -.01876896             .15487001             .22090744
     internet_access             .47412332             .46521547               .266254
               nimby             .32961501              .3033921             .24161584
  cut_socialservices            -.08064631             .07154095             .24679823
       deficit_taxes             .13616276              .3306323             .34366581
  affirmative_action             .38739505             .46786062             .25317566
      environ_policy             .45268857             .48428632             .38336541
         gun_control             .42607184             .39991133             .26474799
         immigration            -.10254395            -.28728566             .11506102
            abortion            -.00281722            -.09381932             .17977307
          healthcare             .46636248             .51675313             .21665895
  cut_domestic_spend            -.22580862             .03901873             .21804933
     cut_raise_taxes             .17485829             .33727833              .2609131
       tariffs_china             .05263178             .06651692             .15552825
           marijuana             .29484593             .41626206             .09579712
            military             .06559248            -.04962411             .13588192
       environ_drill             .16407597             .28910585             .22318858
             voterid             .12873228            -.13813801             .13241294

                          aesthetic_impact  business_taxbreaks_1  business_taxbreaks_2
    aesthetic_impact                     1
business_taxbreaks_1             .24897144                     1
business_taxbreaks_2             .19605466              .7502706                     1
business_taxbreaks_3             .15976758             .60617479             .76667295
   increased_parking             .25646371             .33346247             .28844869
   require_recycling             .32812745             .26174357             .18734256
increase_localpolice             .26636779             .27768997             .28131864
    employee_pension             .22468507             .19887666             .21307582
     internet_access             .24901913             .28200911             .24698486
               nimby             .24222865             .35362019             .31334212
  cut_socialservices             .11983388             .26322158             .28892782
       deficit_taxes             .31525181             .32125073             .27894128
  affirmative_action             .27575368             .28959229             .20485305
      environ_policy             .32197573             .21162567             .09762974
         gun_control             .37947726             .11766047             .05014853
         immigration             .15723929             .20465943             .27135959
            abortion             .15359769             .21302535             .23041829
          healthcare             .19225684             .19465489             .08487338
  cut_domestic_spend             .03700922             .23770468             .26049151
     cut_raise_taxes             .22231457             .22582853             .18426402
       tariffs_china             .19472967             .19642889             .19416836
           marijuana             .08175512             .09763304             .08490498
            military             .21187506             .24789965             .25475043
       environ_drill             .19297027             .13064316             .07746013
             voterid             .17271465             .17959893             .16936445

                      business_taxbreaks_3     increased_parking     require_recycling
business_taxbreaks_3                     1
   increased_parking             .26781249                     1
   require_recycling             .14327064             .30494067                     1
increase_localpolice             .26789742             .23654374             .09766236
    employee_pension             .29458949             .24256948             .16791524
     internet_access             .19443522             .30618918             .39522167
               nimby             .36479672             .37415092               .290403
  cut_socialservices             .35683023             .13784133             .10058058
       deficit_taxes             .29227113             .30655522             .29438752
  affirmative_action             .18741681             .33863511             .39350497
      environ_policy             .03793158             .29783612             .52099616
         gun_control             -.0208864             .27324086             .51288636
         immigration             .33217821             .06109469             -.1799613
            abortion             .28363865             .09549023            -.00685766
          healthcare             .09781033             .29839886             .41950929
  cut_domestic_spend             .40500018             .17607869             .01578923
     cut_raise_taxes             .22596829             .32310488             .30422462
       tariffs_china              .1915603             .17135729             .08238532
           marijuana             .09680624             .19569351             .20505808
            military              .2238099             .13722518             .00728684
       environ_drill             .05291054             .20760917             .27638856
             voterid             .22115116             .16982916             .07243563

                      increase_localpolice      employee_pension       internet_access
increase_localpolice                     1
    employee_pension             .12344175                     1
     internet_access             .06385923             .12092569                     1
               nimby             .07860819             .24964581             .40271104
  cut_socialservices             .08910282             .41082542             .10982542
       deficit_taxes             .03954056             .36409692              .4493233
  affirmative_action            -.09872577             .21634095             .48170944
      environ_policy             -.0517639             .15213778             .46685738
         gun_control             .15384538             .02789361             .33678554
         immigration             .54432428                .16941            -.16964063
            abortion             .33923953             .26197456            -.05162408
          healthcare            -.10224108             .15855254             .48709437
  cut_domestic_spend             .14866381             .44240576             .06253205
     cut_raise_taxes             .02589578             .31026177             .44206822
       tariffs_china             .24864213             .23373326             .06832719
           marijuana            -.16747922             .13492347             .29512037
            military             .40333704              .1368322            -.00849994
       environ_drill            -.05633574             .14653768             .27890386
             voterid             .44614774              .0716346            -.11133099

                                     nimby    cut_socialservices         deficit_taxes
               nimby                     1
  cut_socialservices             .39141618                     1
       deficit_taxes             .51948118             .48765917                     1
  affirmative_action             .45049856             .30370686             .47991843
      environ_policy             .31028146             .08722166             .41866457
         gun_control              .1543597              -.134089             .11567599
         immigration            -.04763462              .2394022            -.08035607
            abortion             .04852274             .30945764             .11254714
          healthcare             .39035388             .15166611             .37366113
  cut_domestic_spend             .34805661             .64701364             .46750221
     cut_raise_taxes             .43654126             .35649307             .63238217
       tariffs_china             .10970199             .19949935             .11374894
           marijuana               .254658             .07021079             .17939332
            military             .06479087              .0982231            -.03846104
       environ_drill             .26979712             .18566336             .34873756
             voterid             .00473935             .05824751            -.12204276

                        affirmative_action        environ_policy           gun_control
  affirmative_action                     1
      environ_policy             .56736215                     1
         gun_control             .33345309             .60031022                     1
         immigration            -.27186381            -.37398818            -.14615094
            abortion             .00571575            -.09212288            -.01737109
          healthcare             .61014489             .60948636             .46944971
  cut_domestic_spend             .28063315             .06024548            -.20206257
     cut_raise_taxes              .4797761             .45335991             .19022123
       tariffs_china             .01883272            -.00769629             .06786542
           marijuana             .38928337             .34348116             .19653251
            military            -.05624761            -.04986897             .12310675
       environ_drill              .3983591             .42751503             .27314375
             voterid            -.21169188             -.1645085             .11041397

                               immigration              abortion            healthcare
         immigration                     1
            abortion             .42873625                     1
          healthcare            -.36857921            -.05580939                     1
  cut_domestic_spend             .36259751             .35763974             .05735422
     cut_raise_taxes            -.10062651             .10644061             .44796076
       tariffs_china             .36770265             .29333082            -.06263068
           marijuana            -.19960082            -.16556624             .45622079
            military             .53241167             .31106231            -.11859517
       environ_drill            -.11114306             .01748962             .38772991
             voterid             .59390488             .35861998            -.14892419

                        cut_domestic_spend       cut_raise_taxes         tariffs_china
  cut_domestic_spend                     1
     cut_raise_taxes             .41288251                     1
       tariffs_china             .22640149             .14992348                     1
           marijuana               .047034             .27453132            -.00622482
            military             .16819943            -.00736742             .33279824
       environ_drill             .16110523             .33787513             .10513093
             voterid              .1114032            -.19199674             .30299017

                                 marijuana              military         environ_drill
           marijuana                     1
            military            -.00843748                     1
       environ_drill             .26296711             .01352578                     1
             voterid            -.06680511               .417798            -.07951753

                                   voterid
             voterid                     1

. 
. display r(sum_w)
901

. global N = r(sum_w)

. matrix r = r(R)

. factormat r, n($N) factors(6)
(obs=901)

Factor analysis/correlation                      Number of obs    =        901
    Method: principal factors                    Retained factors =          6
    Rotation: (unrotated)                        Number of params =        171

    --------------------------------------------------------------------------
         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
    -------------+------------------------------------------------------------
        Factor1  |      7.84492      3.78866            0.4934       0.4934
        Factor2  |      4.05626      1.88573            0.2551       0.7486
        Factor3  |      2.17053      0.96044            0.1365       0.8851
        Factor4  |      1.21009      0.66716            0.0761       0.9612
        Factor5  |      0.54293      0.09576            0.0341       0.9954
        Factor6  |      0.44717      0.15332            0.0281       1.0235
        Factor7  |      0.29385      0.07675            0.0185       1.0420
        Factor8  |      0.21710      0.02570            0.0137       1.0556
        Factor9  |      0.19140      0.01864            0.0120       1.0677
       Factor10  |      0.17276      0.04465            0.0109       1.0785
       Factor11  |      0.12811      0.02573            0.0081       1.0866
       Factor12  |      0.10238      0.01070            0.0064       1.0930
       Factor13  |      0.09168      0.02092            0.0058       1.0988
       Factor14  |      0.07076      0.01875            0.0045       1.1032
       Factor15  |      0.05201      0.01553            0.0033       1.1065
       Factor16  |      0.03648      0.03002            0.0023       1.1088
       Factor17  |      0.00646      0.01180            0.0004       1.1092
       Factor18  |     -0.00535      0.03449           -0.0003       1.1089
       Factor19  |     -0.03984      0.00799           -0.0025       1.1064
       Factor20  |     -0.04783      0.01472           -0.0030       1.1034
       Factor21  |     -0.06255      0.00758           -0.0039       1.0994
       Factor22  |     -0.07013      0.02901           -0.0044       1.0950
       Factor23  |     -0.09913      0.01750           -0.0062       1.0888
       Factor24  |     -0.11664      0.01893           -0.0073       1.0814
       Factor25  |     -0.13557      0.01808           -0.0085       1.0729
       Factor26  |     -0.15365      0.00776           -0.0097       1.0633
       Factor27  |     -0.16141      0.02977           -0.0102       1.0531
       Factor28  |     -0.19118      0.01332           -0.0120       1.0411
       Factor29  |     -0.20450      0.00312           -0.0129       1.0282
       Factor30  |     -0.20763      0.03332           -0.0131       1.0152
       Factor31  |     -0.24095            .           -0.0152       1.0000
    --------------------------------------------------------------------------
    LR test: independent vs. saturated: chi2(465) = 1.4e+04 Prob>chi2 = 0.0000

Factor loadings (pattern matrix) and unique variances

    -----------------------------------------------------------------------------------------
        Variable |  Factor1   Factor2   Factor3   Factor4   Factor5   Factor6 |   Uniqueness 
    -------------+------------------------------------------------------------+--------------
    affordable~g |   0.7151   -0.2167    0.1073   -0.1647    0.1723   -0.1172 |      0.3596  
    rent_contr~s |   0.5304   -0.2046    0.2251    0.0624    0.0596   -0.0021 |      0.6188  
    pre_educat~n |   0.6746   -0.1757    0.1733   -0.0481    0.1173   -0.1717 |      0.4384  
    public_tra~t |   0.6156   -0.1568    0.4696   -0.1519    0.1274   -0.1977 |      0.2976  
    samesex_be~s |   0.6090   -0.2439    0.0181    0.0073    0.0539    0.1121 |      0.5538  
    landuse_li~s |   0.4810    0.1705    0.1105    0.2038   -0.1801   -0.1401 |      0.6338  
    aesthetic_~t |   0.4517    0.1629    0.2344    0.2192   -0.1987   -0.0560 |      0.6238  
    business_t~1 |   0.5090    0.4249    0.0912   -0.4210   -0.1446    0.0481 |      0.3515  
    business_t~2 |   0.4298    0.5236    0.0459   -0.5424   -0.1802    0.1263 |      0.1965  
    business_t~3 |   0.3892    0.5754   -0.0812   -0.4451   -0.0337    0.1270 |      0.2955  
    increased_~g |   0.5105    0.1520    0.0976   -0.0032    0.0676    0.0003 |      0.7021  
    require_re~g |   0.6042   -0.1112    0.1833    0.0955   -0.1798    0.0431 |      0.5457  
    increase_l~e |   0.1407    0.5295    0.3866    0.1144   -0.0570   -0.1341 |      0.5160  
    employee_p~n |   0.3335    0.3317   -0.2503    0.1711    0.0031    0.0791 |      0.6806  
    internet_a~s |   0.6618   -0.1396    0.0209   -0.0757    0.0210   -0.1456 |      0.5147  
           nimby |   0.6187    0.1262   -0.1979   -0.0973    0.1420   -0.1666 |      0.5048  
    cut_social~s |   0.3299    0.4470   -0.4846    0.1140    0.0335   -0.0307 |      0.4414  
    deficit_ta~s |   0.6358    0.1350   -0.4265    0.0971   -0.1494   -0.1848 |      0.3297  
    affirmativ~n |   0.7215   -0.1645   -0.2221    0.0088    0.0609    0.0777 |      0.3932  
    environ_po~y |   0.7141   -0.3192    0.0236    0.1727   -0.2075    0.1436 |      0.2940  
     gun_control |   0.5211   -0.2267    0.4307    0.2354   -0.1634    0.2146 |      0.3633  
     immigration |  -0.1347    0.8124    0.2264    0.1528    0.1464   -0.0146 |      0.2255  
        abortion |   0.0964    0.5475    0.0339    0.1746    0.0144   -0.0224 |      0.6586  
      healthcare |   0.7090   -0.3368   -0.0565    0.0259    0.1540    0.1090 |      0.3445  
    cut_domest~d |   0.2710    0.5614   -0.5551    0.1828    0.0895    0.0357 |      0.2606  
    cut_raise_~s |   0.6150    0.0381   -0.3636    0.1476   -0.0353   -0.0548 |      0.4620  
    tariffs_ch~a |   0.1637    0.4132    0.0972    0.1878    0.0614    0.0785 |      0.7478  
       marijuana |   0.4343   -0.2191   -0.0683   -0.0539    0.2976    0.2342 |      0.6124  
        military |   0.0964    0.5005    0.3097    0.1285    0.1191    0.1207 |      0.5991  
    environ_dr~l |   0.4664   -0.0944   -0.1163    0.1813    0.0081    0.1336 |      0.7093  
         voterid |  -0.0004    0.5325    0.4547    0.1513    0.1774    0.0449 |      0.4533  
    -----------------------------------------------------------------------------------------

. 
. * Comparing separately scaled national and local policy indexes
. 
. irt grm affordable_housing-deficit_taxes

Fitting fixed-effects model:

Iteration 0:   log likelihood = -23807.016  
Iteration 1:   log likelihood = -23776.164  
Iteration 2:   log likelihood = -23775.818  
Iteration 3:   log likelihood = -23775.818  

Fitting full model:

Iteration 0:   log likelihood = -22454.445  
Iteration 1:   log likelihood = -22128.163  
Iteration 2:   log likelihood = -22067.228  
Iteration 3:   log likelihood = -22065.611  
Iteration 4:   log likelihood = -22065.608  
Iteration 5:   log likelihood = -22065.608  

Graded response model                                      Number of obs = 909
Log likelihood = -22065.608
------------------------------------------------------------------------------
             | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
affordable~g |
     Discrim |   2.077985   .1467156    14.16   0.000     1.790428    2.365543
        Diff |
        >=2  |  -.4714717   .0597875                      -.588653   -.3542903
        >=3  |   .5769017   .0563337                      .4664897    .6873137
        >=4  |   1.457587   .0884622                      1.284205     1.63097
         =5  |   2.065948   .1283363                      1.814413    2.317482
-------------+----------------------------------------------------------------
rent_contr~s |
     Discrim |   1.125505    .094945    11.85   0.000     .9394161    1.311594
        Diff |
        >=2  |  -.5155727   .0854438                     -.6830394    -.348106
        >=3  |   .5791045   .0800471                      .4222151    .7359938
        >=4  |   1.774789   .1453656                      1.489878    2.059701
         =5  |   2.665642   .2176458                      2.239065     3.09222
-------------+----------------------------------------------------------------
pre_educat~n |
     Discrim |   1.919743   .1395174    13.76   0.000     1.646294    2.193192
        Diff |
        >=2  |   -.325756   .0587562                      -.440916    -.210596
        >=3  |   .6354457   .0599998                      .5178482    .7530431
        >=4  |   1.498572   .0949456                      1.312482    1.684662
         =5  |   2.095858   .1338022                       1.83361    2.358105
-------------+----------------------------------------------------------------
public_tra~t |
     Discrim |   1.733711   .1327835    13.06   0.000     1.473461    1.993962
        Diff |
        >=2  |  -.0826453   .0578467                     -.1960228    .0307322
        >=3  |   1.109496   .0805987                       .951525    1.267466
        >=4  |   2.221936   .1511671                      1.925654    2.518218
         =5  |   3.131253   .2438076                      2.653399    3.609107
-------------+----------------------------------------------------------------
samesex_be~s |
     Discrim |   1.258672   .0991477    12.69   0.000     1.064346    1.452998
        Diff |
        >=2  |  -.6928456   .0854363                     -.8602976   -.5253935
        >=3  |   .3352686   .0691482                      .1997407    .4707966
        >=4  |   1.674148   .1279992                      1.423274    1.925021
         =5  |   2.095831   .1580996                      1.785961      2.4057
-------------+----------------------------------------------------------------
landuse_li~s |
     Discrim |   1.164754   .0920484    12.65   0.000      .984342    1.345165
        Diff |
        >=2  |   -1.15378   .1105782                     -1.370509   -.9370509
        >=3  |   .3668239   .0723828                      .2249562    .5086917
        >=4  |    1.74242   .1375303                      1.472865    2.011974
         =5  |   2.831165   .2250082                      2.390157    3.272173
-------------+----------------------------------------------------------------
aesthetic_~t |
     Discrim |   .9891752   .0854692    11.57   0.000     .8216586    1.156692
        Diff |
        >=2  |  -1.256061   .1289758                     -1.508849   -1.003273
        >=3  |   .4189999   .0835151                      .2553133    .5826866
        >=4  |   1.943666   .1698904                      1.610687    2.276645
         =5  |   2.936584   .2536789                      2.439383    3.433786
-------------+----------------------------------------------------------------
business_t~1 |
     Discrim |   1.420251   .1045768    13.58   0.000     1.215284    1.625217
        Diff |
        >=2  |   -1.05771   .0932524                     -1.240481   -.8749382
        >=3  |   .3529375   .0638141                      .2278642    .4780108
        >=4  |   1.572486    .112133                      1.352709    1.792263
         =5  |   2.534698   .1830655                      2.175897      2.8935
-------------+----------------------------------------------------------------
business_t~2 |
     Discrim |   1.154523   .0915363    12.61   0.000     .9751151    1.333931
        Diff |
        >=2  |  -1.564924   .1318271                     -1.823301   -1.306548
        >=3  |     .14075   .0710731                      .0014493    .2800506
        >=4  |   1.535929   .1242859                      1.292333    1.779525
         =5  |   2.853027   .2268538                      2.408402    3.297652
-------------+----------------------------------------------------------------
business_t~3 |
     Discrim |   .9924435   .0840501    11.81   0.000     .8277083    1.157179
        Diff |
        >=2  |  -1.854311   .1634691                     -2.174705   -1.533918
        >=3  |  -.2202764   .0830112                     -.3829753   -.0575775
        >=4  |   1.177016   .1135987                      .9543671    1.399666
         =5  |   2.403636   .2049495                      2.001942     2.80533
-------------+----------------------------------------------------------------
increased_~g |
     Discrim |   1.214023   .0924421    13.13   0.000      1.03284    1.395206
        Diff |
        >=2  |  -1.400239   .1188764                     -1.633232   -1.167245
        >=3  |   .0084267   .0690221                     -.1268541    .1437075
        >=4  |   2.099768   .1566813                      1.792678    2.406858
         =5  |    2.96405   .2290092                      2.515201      3.4129
-------------+----------------------------------------------------------------
require_re~g |
     Discrim |    1.39307   .1098167    12.69   0.000     1.177833    1.608307
        Diff |
        >=2  |  -.3296759   .0691606                     -.4652282   -.1941236
        >=3  |    .777499   .0774451                      .6257095    .9292886
        >=4  |   1.929672   .1422315                      1.650903     2.20844
         =5  |   2.616959   .1974385                      2.229987    3.003931
-------------+----------------------------------------------------------------
increase_l~e |
     Discrim |   .5043598   .0728428     6.92   0.000     .3615905     .647129
        Diff |
        >=2  |  -1.146251   .2154159                     -1.568459   -.7240438
        >=3  |   1.166875   .2068144                       .761526    1.572224
        >=4  |   3.923603   .5659108                      2.814439    5.032768
         =5  |   5.925483   .8674207                       4.22537    7.625597
-------------+----------------------------------------------------------------
employee_p~n |
     Discrim |    .694115   .0757295     9.17   0.000      .545688     .842542
        Diff |
        >=2  |  -2.569758   .2866089                     -3.131501   -2.008015
        >=3  |  -.6638916   .1309321                     -.9205137   -.4072694
        >=4  |   1.498999    .178759                      1.148638     1.84936
         =5  |   3.029443    .334792                      2.373263    3.685623
-------------+----------------------------------------------------------------
internet_a~s |
     Discrim |   1.675463   .1187796    14.11   0.000     1.442659    1.908267
        Diff |
        >=2  |  -.6270189   .0705143                     -.7652244   -.4888134
        >=3  |   .3687849   .0586309                      .2538704    .4836994
        >=4  |   1.390365   .0928269                      1.208428    1.572303
         =5  |   2.095392   .1375161                      1.825866    2.364919
-------------+----------------------------------------------------------------
nimby        |
     Discrim |   1.550291   .1077578    14.39   0.000      1.33909    1.761493
        Diff |
        >=2  |  -1.192292   .0938196                     -1.376175   -1.008409
        >=3  |  -.0303277   .0601288                      -.148178    .0875225
        >=4  |   .8711384   .0733212                      .7274316    1.014845
         =5  |   1.611396   .1104686                      1.394881    1.827911
-------------+----------------------------------------------------------------
cut_social~s |
     Discrim |   .6551822    .077219     8.48   0.000     .5038357    .8065288
        Diff |
        >=2  |  -3.173132   .3739954                     -3.906149   -2.440115
        >=3  |  -1.213981   .1860331                     -1.578599   -.8493629
        >=4  |   .1861699    .109279                      -.028013    .4003527
         =5  |   1.803129   .2242577                      1.363592    2.242666
-------------+----------------------------------------------------------------
deficit_ta~s |
     Discrim |   1.310048   .0955743    13.71   0.000     1.122726     1.49737
        Diff |
        >=2  |  -2.014972   .1447086                     -2.298595   -1.731348
        >=3  |  -.6108945   .0795296                     -.7667695   -.4550194
        >=4  |   .3468772   .0666031                      .2163376    .4774169
         =5  |   1.092031   .0929245                      .9099025     1.27416
------------------------------------------------------------------------------

. predict localscale, latent
(option ebmeans assumed)
(using 7 quadrature points)

. 
. irt grm affirmative_action-voterid

Fitting fixed-effects model:

Iteration 0:   log likelihood = -17542.963  
Iteration 1:   log likelihood = -17514.792  
Iteration 2:   log likelihood = -17514.108  
Iteration 3:   log likelihood = -17514.108  

Fitting full model:

Iteration 0:   log likelihood = -17180.441  (not concave)
Iteration 1:   log likelihood = -16832.731  
Iteration 2:   log likelihood = -16686.126  
Iteration 3:   log likelihood = -16639.588  
Iteration 4:   log likelihood = -16636.012  
Iteration 5:   log likelihood = -16636.002  
Iteration 6:   log likelihood = -16636.002  

Graded response model                                      Number of obs = 909
Log likelihood = -16636.002
------------------------------------------------------------------------------
             | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
affirmativ~n |
     Discrim |   2.025366   .1383239    14.64   0.000     1.754256    2.296475
        Diff |
        >=2  |   -1.13503   .0758083                     -1.283611   -.9864483
        >=3  |  -.3163154   .0548298                     -.4237799   -.2088509
        >=4  |   .5974734   .0599216                      .4800291    .7149177
         =5  |   1.174288   .0788504                      1.019744    1.328832
-------------+----------------------------------------------------------------
environ_po~y |
     Discrim |   2.425051   .1717562    14.12   0.000     2.088415    2.761687
        Diff |
        >=2  |   -.632073   .0572965                      -.744372    -.519774
        >=3  |   .1520968   .0495463                      .0549879    .2492057
        >=4  |   1.072026   .0694474                      .9359115     1.20814
         =5  |   1.511072    .086493                      1.341549    1.680595
-------------+----------------------------------------------------------------
gun_control  |
     Discrim |    1.11323   .0989682    11.25   0.000     .9192562    1.307205
        Diff |
        >=2  |   .1535532   .0742704                       .007986    .2991205
        >=3  |    1.23966   .1178832                      1.008613    1.470707
        >=4  |   2.353951    .198442                      1.965012     2.74289
         =5  |   3.093818   .2606775                      2.582899    3.604736
-------------+----------------------------------------------------------------
immigration  |
     Discrim |  -.8174042   .0892895    -9.15   0.000    -.9924084      -.6424
        Diff |
        >=2  |   1.212149   .1492251                      .9196736    1.504625
        >=3  |  -.0192292   .0912147                     -.1980067    .1595484
        >=4  |  -1.028224   .1399776                     -1.302575   -.7538725
         =5  |    -1.8831   .2122298                     -2.299063   -1.467138
-------------+----------------------------------------------------------------
abortion     |
     Discrim |  -.1692702   .0765093    -2.21   0.027    -.3192256   -.0193148
        Diff |
        >=2  |   5.786747   2.616931                      .6576576    10.91584
        >=3  |   .9277145    .556951                     -.1638894    2.019318
        >=4  |  -5.161648   2.376163                     -9.818841   -.5044541
         =5  |  -8.233152   3.738986                     -15.56143   -.9048739
-------------+----------------------------------------------------------------
healthcare   |
     Discrim |   2.493907   .1805192    13.82   0.000     2.140096    2.847718
        Diff |
        >=2  |  -.5260632   .0545889                     -.6330556   -.4190709
        >=3  |   .1321837    .049174                      .0358044     .228563
        >=4  |   .8488463   .0623588                      .7266253    .9710672
         =5  |   1.254915   .0758471                      1.106257    1.403572
-------------+----------------------------------------------------------------
cut_domest~d |
     Discrim |    .195052   .0801536     2.43   0.015     .0379539    .3521501
        Diff |
        >=2  |  -11.40108   4.695878                     -20.60483   -2.197331
        >=3  |  -6.432271   2.687767                      -11.7002   -1.164345
        >=4  |   -1.51616    .741634                     -2.969736   -.0625838
         =5  |   1.519284    .685739                      .1752598    2.863307
-------------+----------------------------------------------------------------
cut_raise_~s |
     Discrim |    1.26829   .0983492    12.90   0.000     1.075529    1.461051
        Diff |
        >=2  |   -1.83505   .1381943                     -2.105906   -1.564194
        >=3  |  -.6387206   .0788555                     -.7932744   -.4841667
        >=4  |   .3233586   .0699618                      .1862359    .4604813
         =5  |   1.091064   .0982855                      .8984281      1.2837
-------------+----------------------------------------------------------------
tariffs_ch~a |
     Discrim |   -.045621   .0724453    -0.63   0.529    -.1876113    .0963692
        Diff |
        >=2  |   21.98614   34.96424                     -46.54251    90.51479
        >=3  |  -.1313066   1.465501                     -3.003635    2.741022
        >=4  |  -34.28205   54.41471                     -140.9329    72.36883
         =5  |   -57.2579   90.92042                     -235.4587    120.9429
-------------+----------------------------------------------------------------
marijuana    |
     Discrim |   1.020044   .0877422    11.63   0.000      .848072    1.192015
        Diff |
        >=2  |  -.7537996    .096024                     -.9420032   -.5655959
        >=3  |   .2674803   .0802425                      .1102078    .4247528
        >=4  |   1.427477   .1337411                       1.16535    1.689605
         =5  |   2.003739   .1732581                      1.664159    2.343318
-------------+----------------------------------------------------------------
military     |
     Discrim |  -.1780852   .0736351    -2.42   0.016    -.3224073   -.0337631
        Diff |
        >=2  |   4.286322   1.795143                      .7679066    7.804738
        >=3  |  -1.909429    .880298                     -3.634781   -.1840765
        >=4  |  -9.763932   4.055568                      -17.7127   -1.815165
         =5  |  -15.66131   6.491721                     -28.38485   -2.937776
-------------+----------------------------------------------------------------
environ_dr~l |
     Discrim |      1.186   .0925946    12.81   0.000     1.004518    1.367482
        Diff |
        >=2  |  -1.175943   .1059003                     -1.383504   -.9683824
        >=3  |  -.1939286   .0714106                     -.3338908   -.0539664
        >=4  |   .9448091   .0923535                      .7637995    1.125819
         =5  |   1.731182   .1367183                      1.463219    1.999145
-------------+----------------------------------------------------------------
voterid      |
     Discrim |  -.4429666   .0818573    -5.41   0.000     -.603404   -.2825293
        Diff |
        >=2  |  -.1904293   .1588958                     -.5018594    .1210008
        >=3  |  -2.428601   .4608564                     -3.331862   -1.525339
        >=4  |  -4.859251   .8971484                      -6.61763   -3.100873
         =5  |  -6.718055   1.244097                      -9.15644    -4.27967
------------------------------------------------------------------------------

. predict natlscale, latent
(option ebmeans assumed)
(using 7 quadrature points)

. 
. recode ideo5 6=3
(75 changes made to ideo5)

. 
. pwcorr localscale natlscale ideo5, sig

             | locals~e natlsc~e    ideo5
-------------+---------------------------
  localscale |   1.0000 
             |
             |
   natlscale |   0.6578   1.0000 
             |   0.0000
             |
       ideo5 |   0.2806   0.5564   1.0000 
             |   0.0000   0.0000
             |

. 
. * Single IRT model (not in PAP)
. 
. irt grm affordable_housing-deficit_taxes affirmative_action-voterid

Fitting fixed-effects model:

Iteration 0:   log likelihood = -41317.642  
Iteration 1:   log likelihood = -41290.206  
Iteration 2:   log likelihood = -41289.926  
Iteration 3:   log likelihood = -41289.925  

Fitting full model:

Iteration 0:   log likelihood = -39284.344  (not concave)
Iteration 1:   log likelihood = -38715.322  
Iteration 2:   log likelihood = -38466.377  
Iteration 3:   log likelihood = -38456.725  
Iteration 4:   log likelihood =  -38456.66  
Iteration 5:   log likelihood =  -38456.66  

Graded response model                                      Number of obs = 909
Log likelihood = -38456.66
------------------------------------------------------------------------------
             | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
affordable~g |
     Discrim |   2.253786   .1477512    15.25   0.000     1.964199    2.543373
        Diff |
        >=2  |  -.4278087   .0564263                     -.5384022   -.3172153
        >=3  |   .5549895   .0536378                      .4498615    .6601176
        >=4  |   1.389188   .0819859                      1.228499    1.549877
         =5  |   1.967162   .1174094                      1.737044     2.19728
-------------+----------------------------------------------------------------
rent_contr~s |
     Discrim |   1.282099   .1009222    12.70   0.000     1.084295    1.479903
        Diff |
        >=2  |   -.454533   .0768129                     -.6050836   -.3039825
        >=3  |   .5279536   .0717628                       .387301    .6686061
        >=4  |   1.600669   .1241731                      1.357294    1.844044
         =5  |   2.403775   .1839936                      2.043154    2.764396
-------------+----------------------------------------------------------------
pre_educat~n |
     Discrim |     2.0311   .1383294    14.68   0.000     1.759979     2.30222
        Diff |
        >=2  |  -.3057449   .0564411                     -.4163675   -.1951224
        >=3  |   .5997931   .0574362                      .4872203    .7123658
        >=4  |   1.422838   .0890184                      1.248366    1.597311
         =5  |   2.005364   .1245727                      1.761206    2.249522
-------------+----------------------------------------------------------------
public_tra~t |
     Discrim |   1.626819    .122595    13.27   0.000     1.386538    1.867101
        Diff |
        >=2  |  -.0761453   .0593388                     -.1924473    .0401567
        >=3  |   1.137341   .0851218                      .9705055    1.304177
        >=4  |   2.279293    .161027                      1.963686      2.5949
         =5  |   3.220357   .2580817                      2.714526    3.726188
-------------+----------------------------------------------------------------
samesex_be~s |
     Discrim |   1.543707   .1115985    13.83   0.000     1.324978    1.762436
        Diff |
        >=2  |  -.5840215   .0725013                     -.7261215   -.4419215
        >=3  |   .3061255    .060383                       .187777    .4244739
        >=4  |   1.451538   .1025532                      1.250537    1.652538
         =5  |   1.810918   .1252202                      1.565491    2.056345
-------------+----------------------------------------------------------------
landuse_li~s |
     Discrim |    1.12994   .0913749    12.37   0.000      .950849    1.309032
        Diff |
        >=2  |  -1.160252   .1157903                     -1.387197   -.9333071
        >=3  |   .3655059   .0735782                      .2212953    .5097165
        >=4  |   1.760147   .1437805                      1.478342    2.041952
         =5  |   2.882459   .2357578                      2.420382    3.344536
-------------+----------------------------------------------------------------
aesthetic_~t |
     Discrim |   .9716946   .0849104    11.44   0.000     .8052732    1.138116
        Diff |
        >=2  |  -1.266292   .1329268                     -1.526824    -1.00576
        >=3  |   .4185499   .0844873                      .2529578    .5841419
        >=4  |   1.951466   .1748973                      1.608674    2.294259
         =5  |   2.956625   .2613891                      2.444312    3.468938
-------------+----------------------------------------------------------------
business_t~1 |
     Discrim |   1.101162   .0893926    12.32   0.000      .925956    1.276369
        Diff |
        >=2  |  -1.239708   .1210109                     -1.476885   -1.002531
        >=3  |   .3955926    .075509                      .2475976    .5435875
        >=4  |   1.841333   .1508637                      1.545646     2.13702
         =5  |   3.022917   .2506077                      2.531734    3.514099
-------------+----------------------------------------------------------------
business_t~2 |
     Discrim |   .8372871   .0776456    10.78   0.000     .6851047    .9894696
        Diff |
        >=2  |  -1.986819    .196844                     -2.372626   -1.601012
        >=3  |   .1439455   .0895856                     -.0316391    .3195301
        >=4  |    1.92936   .1870969                      1.562657    2.296064
         =5  |   3.666983   .3514792                      2.978097     4.35587
-------------+----------------------------------------------------------------
business_t~3 |
     Discrim |   .7484971   .0738437    10.14   0.000     .6037661    .8932281
        Diff |
        >=2  |  -2.311013   .2391701                     -2.779777   -1.842248
        >=3  |  -.3050354   .1052026                     -.5112287    -.098842
        >=4  |   1.437279   .1597231                      1.124227     1.75033
         =5  |   3.009981   .3045183                      2.413136    3.606826
-------------+----------------------------------------------------------------
increased_~g |
     Discrim |    1.16632   .0898272    12.98   0.000     .9902616    1.342378
        Diff |
        >=2  |  -1.423089   .1254338                     -1.668935   -1.177243
        >=3  |   .0065531   .0705862                     -.1317934    .1448996
        >=4  |   2.144924   .1645683                      1.822376    2.467472
         =5  |   3.039183   .2405649                      2.567684    3.510681
-------------+----------------------------------------------------------------
require_re~g |
     Discrim |   1.537603   .1143532    13.45   0.000     1.313475    1.761731
        Diff |
        >=2  |  -.2888702   .0644522                     -.4151941   -.1625462
        >=3  |   .7355781   .0710271                      .5963675    .8747886
        >=4  |   1.800176   .1263232                      1.552587    2.047765
         =5  |   2.436737   .1745624                      2.094601    2.778873
-------------+----------------------------------------------------------------
increase_l~e |
     Discrim |   .3439296   .0695341     4.95   0.000     .2076453     .480214
        Diff |
        >=2  |  -1.644798    .387453                     -2.404192   -.8854041
        >=3  |   1.646093   .3733422                      .9143559     2.37783
        >=4  |   5.613092   1.135988                      3.386597    7.839588
         =5  |   8.531529   1.741433                      5.118383    11.94467
-------------+----------------------------------------------------------------
employee_p~n |
     Discrim |   .7257334     .07519     9.65   0.000     .5783636    .8731032
        Diff |
        >=2  |  -2.471271   .2655198                      -2.99168   -1.950861
        >=3  |   -.636771   .1239254                     -.8796604   -.3938817
        >=4  |   1.432454   .1663443                      1.106425    1.758482
         =5  |   2.902866   .3080518                      2.299095    3.506636
-------------+----------------------------------------------------------------
internet_a~s |
     Discrim |   1.834879   .1233659    14.87   0.000     1.593086    2.076671
        Diff |
        >=2  |  -.5768412   .0658634                     -.7059312   -.4477512
        >=3  |   .3505232   .0554049                      .2419317    .4591147
        >=4  |   1.303212   .0850524                      1.136513    1.469912
         =5  |   1.963185   .1245206                      1.719129    2.207241
-------------+----------------------------------------------------------------
nimby        |
     Discrim |   1.495264    .103718    14.42   0.000     1.291981    1.698548
        Diff |
        >=2  |  -1.189263   .0976299                     -1.380614   -.9979115
        >=3  |  -.0319222   .0609224                     -.1513279    .0874835
        >=4  |   .8735871   .0751254                      .7263441     1.02083
         =5  |   1.632402   .1142327                      1.408511    1.856294
-------------+----------------------------------------------------------------
cut_social~s |
     Discrim |   .6762481   .0753927     8.97   0.000     .5284811    .8240151
        Diff |
        >=2  |  -3.087813   .3481597                     -3.770194   -2.405433
        >=3  |   -1.18023   .1753644                     -1.523938   -.8365225
        >=4  |   .1789364   .1061318                     -.0290782    .3869509
         =5  |     1.7521    .209511                      1.341466    2.162734
-------------+----------------------------------------------------------------
deficit_ta~s |
     Discrim |   1.455013    .100012    14.55   0.000     1.258993    1.651033
        Diff |
        >=2  |  -1.870794   .1322138                     -2.129928    -1.61166
        >=3  |  -.5658038   .0732631                     -.7093968   -.4222108
        >=4  |   .3172841   .0618816                      .1959984    .4385697
         =5  |   1.013169   .0836562                      .8492054    1.177132
-------------+----------------------------------------------------------------
affirmativ~n |
     Discrim |   2.082118   .1329164    15.66   0.000     1.821606    2.342629
        Diff |
        >=2  |   -1.02525   .0769333                     -1.176036   -.8744631
        >=3  |  -.2006184   .0536656                     -.3058011   -.0954357
        >=4  |   .6436773   .0569674                      .5320232    .7553314
         =5  |   1.128472   .0741327                      .9831745    1.273769
-------------+----------------------------------------------------------------
environ_po~y |
     Discrim |   2.153134   .1416773    15.20   0.000     1.875452    2.430817
        Diff |
        >=2  |  -.5660571   .0610835                     -.6857786   -.4463356
        >=3  |   .2238152   .0505948                      .1246514    .3229791
        >=4  |    1.11101   .0718917                       .970105    1.251915
         =5  |   1.494206   .0900104                      1.317789    1.670623
-------------+----------------------------------------------------------------
gun_control  |
     Discrim |   1.279352   .1118341    11.44   0.000     1.060162    1.498543
        Diff |
        >=2  |   .1795139   .0665567                      .0490651    .3099626
        >=3  |   1.137231   .1018258                      .9376564    1.336806
        >=4  |    2.11268   .1717797                      1.775998    2.449362
         =5  |   2.740364   .2271766                      2.295106    3.185622
-------------+----------------------------------------------------------------
immigration  |
     Discrim |  -.1209196   .0722318    -1.67   0.094    -.2624913    .0206521
        Diff |
        >=2  |   7.217052   4.313747                     -1.237736    15.67184
        >=3  |    -.28939   .5890504                     -1.443908    .8651276
        >=4  |  -6.514827   3.966326                     -14.28868     1.25903
         =5  |  -11.72018   7.044425                       -25.527    2.086645
-------------+----------------------------------------------------------------
abortion     |
     Discrim |    .250913   .0679621     3.69   0.000     .1177099    .3841162
        Diff |
        >=2  |    -3.8757   1.081188                     -5.994789    -1.75661
        >=3  |   -.520338   .3108714                     -1.129635    .0889588
        >=4  |   3.610094   .9893808                      1.670944    5.549245
         =5  |   5.654502   1.535103                      2.645755    8.663249
-------------+----------------------------------------------------------------
healthcare   |
     Discrim |   2.190241   .1454647    15.06   0.000     1.905136    2.475347
        Diff |
        >=2  |  -.4514196   .0578544                      -.564812   -.3380271
        >=3  |   .2243515   .0502465                      .1258702    .3228328
        >=4  |   .9060105   .0642493                      .7800841    1.031937
         =5  |   1.259689   .0787801                      1.105283    1.414095
-------------+----------------------------------------------------------------
cut_domest~d |
     Discrim |   .5496952   .0766038     7.18   0.000     .3995545    .6998358
        Diff |
        >=2  |  -4.196529   .5793998                     -5.332131   -3.060926
        >=3  |  -2.276386   .3446856                     -2.951957   -1.600814
        >=4  |  -.4554925   .1483333                     -.7462205   -.1647646
         =5  |   .6320243   .1484163                      .3411336    .9229149
-------------+----------------------------------------------------------------
cut_raise_~s |
     Discrim |   1.399949   .0979269    14.30   0.000     1.208016    1.591883
        Diff |
        >=2  |  -1.700407   .1268414                     -1.949011   -1.451802
        >=3  |  -.5141072   .0729379                      -.657063   -.3711515
        >=4  |   .3680985    .064269                      .2421336    .4940635
         =5  |   1.034577   .0863983                      .8652398    1.203915
-------------+----------------------------------------------------------------
tariffs_ch~a |
     Discrim |   .3789934   .0702691     5.39   0.000     .2412685    .5167184
        Diff |
        >=2  |   -2.73437    .524852                     -3.763061   -1.705679
        >=3  |    .015052    .180233                     -.3381982    .3683023
        >=4  |   4.209518   .7958383                      2.649704    5.769333
         =5  |   6.999717   1.318182                      4.416127    9.583306
-------------+----------------------------------------------------------------
marijuana    |
     Discrim |   .9397758   .0865477    10.86   0.000     .7701455    1.109406
        Diff |
        >=2  |  -.7429359   .1073025                      -.953245   -.5326268
        >=3  |   .3396162   .0848554                      .1733027    .5059296
        >=4  |   1.541515   .1500994                      1.247325    1.835704
         =5  |   2.125778   .1973897                      1.738901    2.512655
-------------+----------------------------------------------------------------
military     |
     Discrim |   .2613947   .0679902     3.84   0.000     .1281364     .394653
        Diff |
        >=2  |  -2.921935   .7972362                     -4.484489    -1.35938
        >=3  |   1.365412    .428939                      .5247064    2.206117
        >=4  |   6.745489    1.75937                      3.297187    10.19379
         =5  |   10.74095   2.812414                      5.228715    16.25318
-------------+----------------------------------------------------------------
environ_dr~l |
     Discrim |   1.071912   .0881742    12.16   0.000     .8990938    1.244731
        Diff |
        >=2  |  -1.227747   .1230643                     -1.468948   -.9865452
        >=3  |  -.1693825   .0772258                     -.3207422   -.0180227
        >=4  |   1.041665   .1016174                      .8424983    1.240831
         =5  |   1.847693   .1547958                      1.544298    2.151087
-------------+----------------------------------------------------------------
voterid      |
     Discrim |   .0818962   .0696673     1.18   0.240    -.0546491    .2184416
        Diff |
        >=2  |   .9224617   1.137284                     -1.306574    3.151497
        >=3  |   12.73371   10.85866                     -8.548882     34.0163
        >=4  |   25.70185   21.86338                     -17.14959    68.55328
         =5  |   35.55696   30.26307                     -23.75756    94.87148
------------------------------------------------------------------------------

. 
. * save a version of dataset for additional analysis in R
. 
. save lucid_data2.dta, replace
file lucid_data2.dta saved

. 
. * Graphs (not in PAP)
. 
. twoway scatter localscale natlscale, mc(black%50) aspect(1) xtitle("National issues scale") yt
> itle("Local issues scale") || lfit localscale natlscale, lc(red) lp(solid) legend(off) text(-2
>  2 "r = 0.658")

. graph export "figure2.png", replace
file /Users/bschaf03/Dropbox/Local and National Ideology Survey/Analysis/Replication
    Files/figure2.png saved as PNG format

. 
. * Correlation of scales contingent on order in which they were asked (Not in PAP)
. 
. bysort fl_6_do: pwcorr localscale natlscale ideo5, sig

------------------------------------------------------------------------------------------------
-> fl_6_do = local|national

             | locals~e natlsc~e    ideo5
-------------+---------------------------
  localscale |   1.0000 
             |
             |
   natlscale |   0.6396   1.0000 
             |   0.0000
             |
       ideo5 |   0.2832   0.5330   1.0000 
             |   0.0000   0.0000
             |

------------------------------------------------------------------------------------------------
-> fl_6_do = national|local

             | locals~e natlsc~e    ideo5
-------------+---------------------------
  localscale |   1.0000 
             |
             |
   natlscale |   0.6739   1.0000 
             |   0.0000
             |
       ideo5 |   0.2780   0.5789   1.0000 
             |   0.0000   0.0000
             |

. 
. * Ideological means by party
. gen party2 = 1 if pid7<4
(486 missing values generated)

. replace party2 = 2 if pid7>4 & pid7<8
(292 real changes made)

. label def party2 1 "Democrats" 2 "Republicans"

. label values party2 party2

. 
. sureg (localscale = party2) (natlscale = party2)

Seemingly unrelated regression
------------------------------------------------------------------------------
Equation             Obs   Params         RMSE  "R-squared"      chi2   P>chi2
------------------------------------------------------------------------------
localscale           715        1     .9192873      0.1218      99.14   0.0000
natlscale            715        1     .7784276      0.3473     380.48   0.0000
------------------------------------------------------------------------------

------------------------------------------------------------------------------
             | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
localscale   |
      party2 |   .6964162   .0699427     9.96   0.000     .5593309    .8335014
       _cons |  -1.041217   .1043337    -9.98   0.000    -1.245708   -.8367271
-------------+----------------------------------------------------------------
natlscale    |
      party2 |   1.155252   .0592256    19.51   0.000     1.039172    1.271332
       _cons |  -1.649438    .088347   -18.67   0.000    -1.822594   -1.476281
------------------------------------------------------------------------------

. margins, over(party2)

Predictive margins                                         Number of obs = 715

Over: party2

1._predict: Linear prediction, predict(xb equation(localscale))
2._predict: Linear prediction, predict(xb equation(natlscale))

---------------------------------------------------------------------------------
                |            Delta-method
                |     Margin   std. err.      z    P>|z|     [95% conf. interval]
----------------+----------------------------------------------------------------
_predict#party2 |
   1#Democrats  |  -.3448013   .0446973    -7.71   0.000    -.4324063   -.2571962
 1#Republicans  |   .3516149   .0537972     6.54   0.000     .2461743    .4570555
   2#Democrats  |  -.4941854   .0378484   -13.06   0.000     -.568367   -.4200038
 2#Republicans  |   .6610668    .045554    14.51   0.000     .5717825     .750351
---------------------------------------------------------------------------------

. marginsplot, horiz plotd(party2) aspect(.3) ylabel(1 "Local issue scale" 2 "National issue sca
> le") ytitle(" ") xtitle("Average placement") legend(pos(6) row(1)) title(" ")

Variables that uniquely identify margins: party2 _equation

. graph export "figure4.png", replace
file /Users/bschaf03/Dropbox/Local and National Ideology Survey/Analysis/Replication
    Files/figure4.png saved as PNG format

. 
. 
. * Models predicting local/national ideology scales (Not in PAP)
. 
. recode ownhome 2/3=0
(357 changes made to ownhome)

. recode gender 1=0 2=1, gen(female)
(909 differences between gender and female)

. recode educ 1/4=0 5/6=1, gen(college)
(907 differences between educ and college)

. recode urbancity 1=0 2=1 3=0, gen(suburb)
(908 differences between urbancity and suburb)

. recode urbancity 1/2=0 3=1, gen(rural)
(908 differences between urbancity and rural)

. recode child18 2=0, gen(children)
(602 differences between child18 and children)

. recode pid7 8=4, gen(partisanship)
(76 differences between pid7 and partisanship)

. replace partisanship=(partisanship-1)/6
(909 real changes made)

. recode race4 1=0 2=1 3/4=0, gen(black)
(909 differences between race4 and black)

. recode race4 1/2=0 3=1 4=0, gen(latino)
(909 differences between race4 and latino)

. recode race4 1/3=0 4=1, gen(other)
(909 differences between race4 and other)

. * Add income
. 
. 
. 
. sureg (natlscale = black latino other age college partisanship female ownhome suburb rural chi
> ldren) (localscale = black latino other age college partisanship female ownhome suburb rural c
> hildren)

Seemingly unrelated regression
------------------------------------------------------------------------------
Equation             Obs   Params         RMSE  "R-squared"      chi2   P>chi2
------------------------------------------------------------------------------
natlscale            905       11     .7242162      0.3753     543.72   0.0000
localscale           905       11     .8296012      0.2254     263.29   0.0000
------------------------------------------------------------------------------

------------------------------------------------------------------------------
             | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
natlscale    |
       black |   .1639361   .0909089     1.80   0.071    -.0142421    .3421142
      latino |   .0826627   .0791377     1.04   0.296    -.0724444    .2377698
       other |  -.0988951   .0937717    -1.05   0.292    -.2826842     .084894
         age |   .0074597   .0016012     4.66   0.000     .0043213     .010598
     college |  -.1518958   .0538128    -2.82   0.005    -.2573671   -.0464246
partisanship |   1.335097    .073494    18.17   0.000     1.191051    1.479143
      female |  -.0018266   .0504536    -0.04   0.971    -.1007138    .0970607
     ownhome |   .1369252   .0552664     2.48   0.013     .0286052    .2452453
      suburb |   .0972928   .0597126     1.63   0.103    -.0197418    .2143274
       rural |   .1890907   .0707548     2.67   0.008     .0504138    .3277675
    children |  -.0647234   .0588157    -1.10   0.271    -.1800001    .0505533
       _cons |  -1.040594   .1040887   -10.00   0.000    -1.244604   -.8365838
-------------+----------------------------------------------------------------
localscale   |
       black |   .1552062   .1041376     1.49   0.136    -.0488997    .3593121
      latino |   .2598786   .0906535     2.87   0.004     .0822009    .4375563
       other |    .158309   .1074169     1.47   0.141    -.0522243    .3688424
         age |   .0050902   .0018342     2.78   0.006     .0014951    .0086852
     college |  -.1122158   .0616435    -1.82   0.069    -.2330348    .0086032
partisanship |   .8008056   .0841886     9.51   0.000     .6357991    .9658122
      female |   .1979902   .0577954     3.43   0.001     .0847133    .3112671
     ownhome |   .0780746   .0633085     1.23   0.217    -.0460077     .202157
      suburb |   .2358387   .0684018     3.45   0.001     .1017737    .3699037
       rural |   .2780505   .0810507     3.43   0.001     .1191939     .436907
    children |  -.2440539   .0673743    -3.62   0.000    -.3761051   -.1120027
       _cons |  -.8333826   .1192353    -6.99   0.000    -1.067079   -.5996858
------------------------------------------------------------------------------

. margins, dydx(*) post level(84)

Average marginal effects                                   Number of obs = 905

dy/dx wrt: black latino other age college partisanship female ownhome suburb rural children

1._predict: Linear prediction, predict(xb equation(natlscale))
2._predict: Linear prediction, predict(xb equation(localscale))

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [84% conf. interval]
-------------+----------------------------------------------------------------
black        |
    _predict |
          1  |   .1639361   .0909089     1.80   0.071     .0362026    .2916696
          2  |   .1552062   .1041376     1.49   0.136     .0088854    .3015269
-------------+----------------------------------------------------------------
latino       |
    _predict |
          1  |   .0826627   .0791377     1.04   0.296    -.0285315    .1938569
          2  |   .2598786   .0906535     2.87   0.004     .1325039    .3872533
-------------+----------------------------------------------------------------
other        |
    _predict |
          1  |  -.0988951   .0937717    -1.05   0.292     -.230651    .0328608
          2  |    .158309   .1074169     1.47   0.141     .0073805    .3092375
-------------+----------------------------------------------------------------
age          |
    _predict |
          1  |   .0074597   .0016012     4.66   0.000     .0052098    .0097095
          2  |   .0050902   .0018342     2.78   0.006      .002513    .0076674
-------------+----------------------------------------------------------------
college      |
    _predict |
          1  |  -.1518958   .0538128    -2.82   0.005    -.2275067    -.076285
          2  |  -.1122158   .0616435    -1.82   0.069    -.1988293   -.0256023
-------------+----------------------------------------------------------------
partisanship |
    _predict |
          1  |   1.335097    .073494    18.17   0.000     1.231833    1.438361
          2  |   .8008056   .0841886     9.51   0.000     .6825147    .9190966
-------------+----------------------------------------------------------------
female       |
    _predict |
          1  |  -.0018266   .0504536    -0.04   0.971    -.0727175    .0690644
          2  |   .1979902   .0577954     3.43   0.001     .1167836    .2791969
-------------+----------------------------------------------------------------
ownhome      |
    _predict |
          1  |   .1369252   .0552664     2.48   0.013     .0592721    .2145784
          2  |   .0780746   .0633085     1.23   0.217    -.0108783    .1670276
-------------+----------------------------------------------------------------
suburb       |
    _predict |
          1  |   .0972928   .0597126     1.63   0.103     .0133923    .1811933
          2  |   .2358387   .0684018     3.45   0.001     .1397293    .3319481
-------------+----------------------------------------------------------------
rural        |
    _predict |
          1  |   .1890907   .0707548     2.67   0.008     .0896751    .2885062
          2  |   .2780505   .0810507     3.43   0.001     .1641684    .3919326
-------------+----------------------------------------------------------------
children     |
    _predict |
          1  |  -.0647234   .0588157    -1.10   0.271    -.1473637    .0179169
          2  |  -.2440539   .0673743    -3.62   0.000    -.3387196   -.1493882
------------------------------------------------------------------------------

. mplotoffset, horiz off(.2) recast(scatter) xline(0, lp(solid) lc(black)) xtitle("Effects on Co
> nservatism") ytitle(" ") title(" ")

  Variables that uniquely identify margins: _deriv _equation

. graph export FigureA3.pdf, replace
file /Users/bschaf03/Dropbox/Local and National Ideology Survey/Analysis/Replication
    Files/FigureA3.pdf saved as PDF format

. 
. * Local item correlations with national policy scale (Not in PAP)
. 
. local varlist  affordable_housing rent_controls pre_education public_transit samesex_benefits 
> landuse_limits aesthetic_impact business_taxbreaks_1 business_taxbreaks_2 business_taxbreaks_3
>  increased_parking require_recycling increase_localpolice employee_pension internet_access nim
> by cut_socialservices deficit_taxes 

. 
. 
. local nvars : word count `varlist' 

. 
. local N = `nvars' * (`nvars' - 1) / 2 

. 
. if `N' > _N set obs `N' 

. 
. gen x2 = "" 
(909 missing values generated)

. gen r2 = . 
(909 missing values generated)

. local k = 1 

. tokenize "`varlist'" 

. 
. forval i = 1/`nvars' { 
  2.     local J = `i' + 1 
  3.         quietly {
  4.             corr ``i'' natlscale 
  5.             replace x2 = "``i''" in `k' 
  6.             replace r2 = r(rho) in `k' 
  7.         }
  8.         local ++k 
  9.     }

. 
. gsort r2

. gen variable=_n if r2!=.
(891 missing values generated)

. labmask variable, val(x2)

. 
. twoway bar r2 variable if r2!=., hor ylabel(1(1)18, val) color(navy%70) ytitle(" ") xtitle("Co
> rrelation with national policy scale") xlabel(-.2(.1).6) aspect(1) barw(.75)

. graph export figure3.png, replace
file /Users/bschaf03/Dropbox/Local and National Ideology Survey/Analysis/Replication
    Files/figure3.png saved as PNG format

. 
. log close
      name:  <unnamed>
       log:  /Users/bschaf03/Dropbox/Local and National Ideology Survey/Analysis/Replication Fil
> es/lucid_replication1.log
  log type:  text
 closed on:  20 Jun 2024, 22:30:09
------------------------------------------------------------------------------------------------
